var args = process.argv.splice(2);
var arr = args.toString().split(",");
var esl = require('modesl'),
    conn = new esl.Connection('127.0.0.1', 8021, 'ClueCon', function() {
        // 之前重新生成了配置文件，后重启external生效
        for (let i=0;i<arr.length;i++){//循环每一条命令
            conn.api(arr[i], function(res) {
                console.log("<--start--"+arr[i]+"--");
                console.log(res.getBody());
                console.log("--end--"+arr[i]+"-->");
            });
        }
        conn.disconnect();
    });